
#include "Thread.hpp"
#include "ThreadPool.hpp"
#include <iostream>
#include <string>
#include <memory>
using namespace std;

int main()
{
    //unique_ptr<ThreadPool<int>> tp=make_unique<ThreadPool<int>>();//c++14
    unique_ptr<ThreadPool<int>> tp(new ThreadPool<int>());//c++11
    tp->InitThreadPool();
    //1.启动线程池
    tp->Start();

    sleep(2);
    tp->Stop();
    //2.投放任务
    //tp->EnQueue();

    //3.回收线程池内部的线程
    tp->Wait();
    return 0;
}